# chatGPT 给出的测试代码


import cv2
import numpy as np
import sys

sys.path.append('/path/to/openpose/python')
from src.utils.openpose.pyopenpose import pyopenpose as op

# 加载 OpenPose 模型
params = dict()
params["model_folder"] = "/path/to/openpose/models"
opWrapper = op.WrapperPython()
opWrapper.configure(params)
opWrapper.start()

# 读取图像
image = cv2.imread("/path/to/image.jpg")

# 检测关键点
keypoints, output_image = opWrapper.detect_keypoints(image, op.get_default_kp_model(), op.KeypointScale.Size200x200)

# 显示关键点
cv2.imshow("关键点", output_image)
cv2.waitKey(0)
cv2.destroyAllWindows()
